let screenWidth=0
function setRem(sw) {
    screenWidth=sw
    changeRem()
}
function changeRem(){
    let a=document.documentElement.clientWidth||document.body.clientWidth;
    document.documentElement.style.fontSize=(a/screenWidth)*100+"px"
}
window.onresize=()=>{changeRem()}

export {setRem,changeRem}